package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Orderproduct;
import com.pets.springboot_petshop.mapper.OrderproductMapper;
import com.pets.springboot_petshop.service.OrderproductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/15 下午2:50 周二
 * @Description: 订单详情实现类
 */
@Service
public class OrderproductServiceImpl implements OrderproductService {
    @Autowired
    private OrderproductMapper orderproductMapper;

    @Override
    public List<Orderproduct> selectorder_id(int order_id) {
        return orderproductMapper.selectorder_id(order_id);
    }

    @Override
    public List<Orderproduct> findAll() {
        return orderproductMapper.findAll();
    }

    @Override
    public int add(Orderproduct orderproduct) {
        return orderproductMapper.add(orderproduct);
    }

    @Override
    public int delete(int id) {
        return orderproductMapper.delete(id);
    }

    @Override
    public int update(Orderproduct orderproduct) {
        return orderproductMapper.update(orderproduct);
    }
}
